<?php

function standart_autoload($class_name) {
    $dirs = array(
            'libraries'
    );
    $class_name = str_replace('_', DIRECTORY_SEPARATOR, $class_name);
    foreach($dirs as $dir) {
        $c = JPATH_ROOT.DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR.$class_name.'.php';
        if( file_exists($c)) {
            require_once $c;
            break;
        }
    }
    return false;
}

spl_autoload_register('standart_autoload');
